  /* 用户相关的接口 */ 
  import axios from "axios"
  //注册
  export const register = (values)=>{
    const data = values
    console.log(values)
    axios({
      method: 'post',
      url: '/api/register',
      data: {
        "telphone":data.telphone,
        "password":data.password
      }
    })
    .then(res => {
        console.log(res)
        if(res.status === 0){
          window.location.pathname = '/home'
        }
    })
    .catch(err => {console.log(err)})
  }

  //查询用户信息：
  export const getUserInfo = ()=>{
    return axios.get('/my/userinfo');
  }